cluster=$1
config_path=$2
cor=$3
maxDelta=$4
type=${6}

source ${config_path}/config.sh

${Rscript_archr} ${scripts_dir}/run_TFregulators.use.R \
--comine_data_file ${output_dir}/subcell/${cluster}/${cluster}.combineRNA.motif_peak2gene.Rdata \
--comine_data_all_file ${output_dir}/qc_atac_v2/${type}/testis_combined_peak.combineRNA.qc.Rdata \
--report_tf_file ${config_path}/TF_upregulated_during_spermatogenesis.csv \
--scriptPath ${scripts_dir}/scScalpChromatin \
--cor ${cor} \
--maxDelta ${maxDelta} \
--out_path ${output_dir}/tf_regulators_${cor}_${maxDelta}/${type}/${cluster} \
2> ${log_path}/tf_regulators_${cor}_${maxDelta}.${cluster}.log
